package com.beyond.trace.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;

/**
 * 产品质量检测信息对象 t_trace_product_quality_check
 * 
 * @author yao
 * @date 2022-03-02
 */
@Data
@TableName("t_trace_product_quality_check")
public class TraceProductQualityCheck extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "check_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long checkId;

    /** 检测名称 */
    @Excel(name = "检测名称")
    @ApiModelProperty(value = "检测名称")
    private String checkName;

    /** 检测机构 */
    @Excel(name = "检测机构")
    @ApiModelProperty(value = "检测机构")
    @NotEmpty(message = "监测机构不能为空")
    private String checkOrgan;

    /** 产品 */
    @Excel(name = "产品")
    @ApiModelProperty(value = "产品")
    @NotEmpty(message = "产品不能为空")
    private String checkProduct;

    /** 检测日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "检测日期")
    private Date checkProvideTime;

    /** 图片 */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")
    private String checkPic;

    /** 证明人 */
    @Excel(name = "证明人")
    @ApiModelProperty(value = "证明人")
    private String checkPerson;

    /** 证明人联系方式 */
    @Excel(name = "证明人联系方式")
    @ApiModelProperty(value = "证明人联系方式")
    private String checkPersonPhone;

    @Excel(name = "部门id")
    @ApiModelProperty(value = "部门id")
    @JsonIgnore
    private String departId;

    @Excel(name = "官网链接")
    @ApiModelProperty(value = "官网链接")
    private String websiteUrl;

    /** 产品名称 */
    @TableField(exist = false)
    private String productName;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public void setCheckId(Long checkId) 
    {
        this.checkId = checkId;
    }

    public Long getCheckId() 
    {
        return checkId;
    }
    public void setCheckName(String checkName) 
    {
        this.checkName = checkName;
    }

    public String getCheckName() 
    {
        return checkName;
    }
    public void setCheckOrgan(String checkOrgan) 
    {
        this.checkOrgan = checkOrgan;
    }

    public String getCheckOrgan() 
    {
        return checkOrgan;
    }
    public void setCheckProduct(String checkProduct) 
    {
        this.checkProduct = checkProduct;
    }

    public String getCheckProduct() 
    {
        return checkProduct;
    }
    public void setCheckProvideTime(Date checkProvideTime) 
    {
        this.checkProvideTime = checkProvideTime;
    }

    public Date getCheckProvideTime() 
    {
        return checkProvideTime;
    }
    public void setCheckPic(String checkPic) 
    {
        this.checkPic = checkPic;
    }

    public String getCheckPic() 
    {
        return checkPic;
    }
    public void setCheckPerson(String checkPerson) 
    {
        this.checkPerson = checkPerson;
    }

    public String getCheckPerson() 
    {
        return checkPerson;
    }
    public void setCheckPersonPhone(String checkPersonPhone) 
    {
        this.checkPersonPhone = checkPersonPhone;
    }

    public String getCheckPersonPhone() 
    {
        return checkPersonPhone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("checkId", getCheckId())
            .append("checkName", getCheckName())
            .append("checkOrgan", getCheckOrgan())
            .append("checkProduct", getCheckProduct())
            .append("checkProvideTime", getCheckProvideTime())
            .append("checkPic", getCheckPic())
            .append("checkPerson", getCheckPerson())
            .append("checkPersonPhone", getCheckPersonPhone())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
